1. Field of the Invention
This invention is in the field of digital data processors, and more particularly relates to apparatus for changing the format of input operands having a fixed number of bits, or lengths, into an output operand of the same length whose format has a predetermined relationship to the format of the input operands.
2. Description of the Prior Art
Digital data processing systems as they evolved have previously had two bases of organization, or operation, determined by the number of bits the processor handles in parallel. Some such systems are optimized to handle a limited number of bits such as those of an alphanumeric character, or a character oriented system. Others are optimized to handle a number of bits generally significantly larger than that needed for processing an alphanumeric character where such groupings of bits are typically called data words, or words. Systems so organized are called word oriented systems and sometimes scientific systems. The minimum number of bits needed to specify alphanumeric character, 26 letters of the alphabet, 10 decimal digits, plus punctuation is six with the present industry standard being eight bits. Such a grouping of eight bits is frequently defined as a byte, as is a grouping of nine bits. It should be noted, however, that only four bits are needed to specify a decimal digit.
Word oriented systems are, however, frequently required to process alphanumeric information. In such a system in which the number of bits in a word is not an even multiple of an eight bit byte, a 36 bit word system for example; this difference creates problems when the system is used to process characters of eight bits and four bits in the execution of application programs, for example.
In such a word system it is desirable to take maximum advantage of the full capabilities of the system to process the large number of bits of a word in parallel while avoiding the necessity of rewriting application programs designed originally to run on byte, or character, oriented data processing systems. Typically, application programs for processing alphanumeric data are programs for preparing payrolls, controlling inventory and the like. A particular problem occurs with respect to processing decimal characters in a word oriented machine since in order to process the decimal characters efficiently, it is desirable to place up to eight decimal characters in one word, for example, so that two such words can be processed, added, multiplied, etc. in parallel. The format of an operand with eight four bit decimal characters is named a compressed format with the characters contiguous to one another and eight right or left justified in a 36 bit word. It is also necessary to reformat words in the compressed format into formats which are better adapted for storage and retrieval, two such formats are called a packed format and an unpacked format. An operand having two decimal characters in each nine bit byte of a 36 bit word is defined as being a packed format. An operand is in the unpacked format when only one decimal character of four bits is placed in each nine bit byte of a 36 bit word. The packed and unpacked formats are desirable to make efficient use of the data storage capabilities of the memories of word oriented systems which are also organized by data words, and particularly so when there is a need to address a given decimal digit in a byte as is necessary from time to time.
To date, no hardware solution has been developed to reliably change the formats of operands containing decimal characters in a word oriented data processing system within a minimum period of time for subsequent processing, storage and display.